function y = projection(x)

for i=1:length(x) 
    if x(i)>1 
        y(i) = 1;
    else
      if x(i)<0
          y(i) = 0;
       else
        y(i) = x(i);
      end
    end
end